unit uAlerts;

interface

uses SysUtils, Types, Graphics;

procedure Alert(S: string);

var
  AlertMessage: string = '';
  AlertColor: TColor = clWhite;
  AMsgPos: Byte = 3;
  AMsgClr: Byte = 0;    

implementation

uses uSCR, uGUI, uUtils, uResFont;

procedure Alert(S: string);
begin
  AMsgPos := StrToInt(Copy(S, 1, 1));
  AMsgClr := StrToInt(Copy(S, 2, 1));
  Delete(S, 1, 2);
  AlertMessage := S;
  case AMsgClr of
    0: AlertColor := clBlack;
    1: AlertColor := clGray;
    2: AlertColor := clGreen;
    3: AlertColor := clYellow;
    4: AlertColor := clRed;
    5: AlertColor := clMaroon;
    6: AlertColor := clBlue;
    7: AlertColor := clMoneyGreen;
    8: AlertColor := clSkyBlue;
    9: AlertColor := clCream;
  end;
end;

end.
